import axiosInstance from '@/api/axiosInstance'
interface inoviceListParams {
  inv_no?: string
  doctor_name?: string
  docotor_code?: string
  coupon_code?: string
  stat_month?: string // 年月,来自于月份统计
  // 其他查询条件...
}

// 获取订单列表
export const getInoviceList = async (params?: inoviceListParams) => {
  return axiosInstance.get('/admin/invoice', { params })
}

// 获取订单详情
export const getInoviceDetail = async (id: number) => {
  return axiosInstance.get(`/admin/invoice/${id}`)
}

//导出订单列表
export const exportInoviceList = async (params?: inoviceListParams) => {
  return axiosInstance.get('/admin/invoice/export', { params, responseType: 'blob', timeout: 60000 })
}
